<?php

class term extends page{
	
	private $t_vip = 1;
	private $t_vip_info = 2;
	private $t_recharge = 3;
	
	public function getTermList(){
		$t = $this->req['t'];
		if(!$t)$t=$this->t_vip;
		
		$sql = "select * from term where type = '{$t}' and status!=0 order by id";
		$memKey = md5($sql);
		$result = $this->memGet($memKey);	// cache
		if(!$result){
			$result = $this->db->query($sql)->fetchAll();
			$this->memSet($memKey, $result);	// cache
		}
		
		$return['list'] = $result;
		$return['status'] = $this->s_status;
		G::toClient($return);
	}
	
	
}
